<template>
  <div class="box-title">
    <img
      v-if="size === 'small'"
      src="~@/assets/conservation-model/title.png"
      class="top-img"
      alt=""
    />
    <img
      v-if="size === 'big'"
      src="~@/assets/conservation-model/long-title.png"
      class="top-img"
      alt=""
    />
    <div
      class="title-font"
      :style="{
        fontSize: size === 'big' ? '18px' : '15px',
        padding: size === 'big' ? '10px' : ''
      }"
    >
      <img src="~@/assets/conservation-model/title-icon.png" alt="" />
      {{ title }}
    </div>
  </div>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: ""
    },
    size: {
      type: String,
      default: "small"
    }
  },
  data() {
    return {};
  }
};
</script>

<style lang="scss" scoped>
.box-title {
  width: 100%;
  height: 46px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  .top-img {
    height: 6px;
    width: 100%;
  }

  > div {
    width: 100%;
    height: 40px;
    color: #05ebdb;
    font-size: 15px;
    display: flex;
    align-items: center;
    > img {
      width: 15px;
      margin: 0 10px;
    }
  }
}
</style>
